

package net.minecraft.src;  
  
import java.util.Random; //You need to import Java's random number generator, since it is referenced in the file.  
  
public class WorldGenPPH extends WorldGenerator //Always extend WorldGenerator for world generation.  
{   
    public WorldGenPPH()  
    {   
    }  
   
        //This part generates the actual structure. i, j, and k are, in this case, the location of the  
        //structure, measured in blocks, like (54, 72, -189). i and k are usually length/width, and j is  
        //height.  
    public boolean generate(World world, Random random, int i, int j, int k)  
        {  
                //Place any conditions for the generation here. Let's say you want to try to make the structure  
                //generate on grass; you might say:  
                if(world.getBlockId(i, j, k) == Block.grass.blockID)  
                {  
                	int wool = Block.cloth.blockID;
                	int fence = Block.fence.blockID;
                	int fur = Block.workbench.blockID;

                	world.setBlockWithNotify(i + 1, j + 1, k + 1, wool);
                	world.setBlockWithNotify(i + 2, j + 1, k + 1, wool);
                	world.setBlockWithNotify(i + 3, j + 1, k + 1, wool);
                	world.setBlockWithNotify(i + 4, j + 1, k + 1, wool);
                	world.setBlockWithNotify(i + 5, j + 1, k + 1, wool);
                	world.setBlockWithNotify(i + 6, j + 1, k + 1, wool);
                	world.setBlockWithNotify(i + 7, j + 1, k + 1, wool);
                	world.setBlockWithNotify(i + 8, j + 1, k + 1, wool); 
                	world.setBlockWithNotify(i + 8, j + 1, k - 5, wool);
                	world.setBlockWithNotify(i + 7, j + 1, k - 5, wool);
                	world.setBlockWithNotify(i + 6, j + 1, k - 5, wool);
                	world.setBlockWithNotify(i + 5, j + 1, k - 5, wool);
                	world.setBlockWithNotify(i + 4, j + 1, k - 5, wool);
                	world.setBlockWithNotify(i + 3, j + 1, k - 5, wool);
                	world.setBlockWithNotify(i + 2, j + 1, k - 5, wool);
                	world.setBlockWithNotify(i + 1, j + 1, k - 5, wool); 
                	world.setBlockWithNotify(i + 1, j + 2, k - 0, wool);
                	world.setBlockWithNotify(i + 2, j + 2, k - 0, wool);
                	world.setBlockWithNotify(i + 3, j + 2, k - 0, wool);
                	world.setBlockWithNotify(i + 4, j + 2, k - 0, wool);
                	world.setBlockWithNotify(i + 5, j + 2, k - 0, wool);
                	world.setBlockWithNotify(i + 6, j + 2, k - 0, wool);
                	world.setBlockWithNotify(i + 7, j + 2, k - 0, wool);
                	world.setBlockWithNotify(i + 8, j + 2, k - 0, wool);
                	world.setBlockWithNotify(i + 1, j + 2, k - 0, wool);
                	world.setBlockWithNotify(i + 2, j + 2, k - 0, wool);
                	world.setBlockWithNotify(i + 3, j + 2, k - 0, wool);
                	world.setBlockWithNotify(i + 4, j + 2, k - 0, wool);
                	world.setBlockWithNotify(i + 5, j + 2, k - 0, wool);
                	world.setBlockWithNotify(i + 6, j + 2, k - 0, wool);
                	world.setBlockWithNotify(i + 7, j + 2, k - 0, wool);
                	world.setBlockWithNotify(i + 8, j + 2, k - 0, wool);         
                	world.setBlockWithNotify(i + 1, j + 2, k - 4, wool);
                	world.setBlockWithNotify(i + 2, j + 2, k - 4, wool);
                	world.setBlockWithNotify(i + 3, j + 2, k - 4, wool);
                	world.setBlockWithNotify(i + 4, j + 2, k - 4, wool);
                	world.setBlockWithNotify(i + 5, j + 2, k - 4, wool);
                	world.setBlockWithNotify(i + 6, j + 2, k - 4, wool);
                	world.setBlockWithNotify(i + 7, j + 2, k - 4, wool);
                	world.setBlockWithNotify(i + 8, j + 2, k - 4, wool);             
                	world.setBlockWithNotify(i + 1, j + 3, k - 3, wool);
                	world.setBlockWithNotify(i + 2, j + 3, k - 3, wool);
                	world.setBlockWithNotify(i + 3, j + 3, k - 3, wool);
                	world.setBlockWithNotify(i + 4, j + 3, k - 3, wool);
                	world.setBlockWithNotify(i + 5, j + 3, k - 3, wool);
                	world.setBlockWithNotify(i + 6, j + 3, k - 3, wool);
                	world.setBlockWithNotify(i + 7, j + 3, k - 3, wool);
                	world.setBlockWithNotify(i + 8, j + 3, k - 3, wool);              
                	world.setBlockWithNotify(i + 1, j + 3, k - 1, wool);
                	world.setBlockWithNotify(i + 2, j + 3, k - 1, wool);
                	world.setBlockWithNotify(i + 3, j + 3, k - 1, wool);
                	world.setBlockWithNotify(i + 4, j + 3, k - 1, wool);
                	world.setBlockWithNotify(i + 5, j + 3, k - 1, wool);
                	world.setBlockWithNotify(i + 6, j + 3, k - 1, wool);
                	world.setBlockWithNotify(i + 7, j + 3, k - 1, wool);
                	world.setBlockWithNotify(i + 8, j + 3, k - 1, wool);               
                	world.setBlockWithNotify(i + 1, j + 4, k - 2, wool);
                	world.setBlockWithNotify(i + 2, j + 4, k - 2, wool);
                	world.setBlockWithNotify(i + 3, j + 4, k - 2, wool);
                	world.setBlockWithNotify(i + 4, j + 4, k - 2, wool);
                	world.setBlockWithNotify(i + 5, j + 4, k - 2, wool);
                	world.setBlockWithNotify(i + 6, j + 4, k - 2, wool);
                	world.setBlockWithNotify(i + 7, j + 4, k - 2, wool);
                	world.setBlockWithNotify(i + 8, j + 4, k - 2, wool);               
                	world.setBlockWithNotify(i + 1, j + 1, k - 2, fence);
                	world.setBlockWithNotify(i + 1, j + 2, k - 2, fence);
                	world.setBlockWithNotify(i + 1, j + 3, k - 2, fence);
                	world.setBlockWithNotify(i + 8, j + 1, k - 2, fence);
                	world.setBlockWithNotify(i + 8, j + 2, k - 2, fence);
                	world.setBlockWithNotify(i + 8, j + 3, k - 2, fence);
                	world.setBlockWithNotify(i + 3, j + 1, k + 0, fur);
                	               	
                	
                }    
                return true; 
                
                
               
        }  
  
        } 
          